﻿using AppMain;
using System;
using System.Collections.Generic;
using System.Text;

namespace BehaviorTree
{
    public class BaseTree : IBehaviorTree
    {

        private ActionRole agent;
        public BaseTree(ActionRole agent)
        {
            this.agent = agent;
            initialize();
        }

        protected virtual void initialize()
        {

        }

        public IAttrMap AttrMap => this.agent.AttrMap;

        public ActionRole Agent => this.agent;

        protected INode root;
        public INode Root => root;

        public void dispose()
        {
            throw new NotImplementedException();
        }

        public void pause()
        {
            throw new NotImplementedException();
        }

        public void tick(float frameTime)
        {
            Root.tick(frameTime);
        }

    }
}
